home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1995 March / Macworld CD-ROM (March 1995).cdr / Demos / Microsoft Kids / MS Kids Demo / MSKids / 00097.ls < prev    next >
Encoding:
Text File  |  1995-02-01  |  3.5 KB  |  166 lines

  1. on startMovie
  2.   global colorNumber, vga16, clock, xsmall, small, medium, large, counter, EnterCounter, flag, product, viewedCW, viewedFA, projectNum, seenComic, seenSticker, seenPicture
  3.   if the machineType < 256 then
  4.     set the exitLock to 1
  5.   end if
  6.   if the colorDepth < 8 then
  7.     if the machineType = 256 then
  8.       if vga16 = 0 then
  9.         set vga16 to 1
  10.         alert("The Microsoft Home demonstration looks best with your system setup to 256 colors.")
  11.       end if
  12.     end if
  13.   end if
  14.   set clock to 60
  15.   set xsmall to 2 * clock
  16.   set small to 4 * clock
  17.   set medium to 7 * clock
  18.   set large to 9 * clock
  19.   if the machineType = 256 then
  20.     set xsmall to 2 * clock
  21.     set small to 5 * clock
  22.     set medium to 8 * clock
  23.     set large to 11 * clock
  24.   end if
  25.   set projectNum to 0
  26.   set seenComic to 0
  27.   set seenSticker to 0
  28.   set seenPicture to 0
  29.   doTimeoutReset()
  30.   when timeOut then doContinue
  31.   set the textFont of field "talk" to "Palatino"
  32.   set the textStyle of field "talk" to "bold"
  33.   set the textSize of field "talk" to 14
  34.   set the textFont of field "talkSmall" to "Palatino"
  35.   set the textStyle of field "talkSmall" to "bold"
  36.   set the textSize of field "talkSmall" to 14
  37.   set the keyDownScript to "doKeyDown"
  38.   set EnterCounter to 0
  39. end
  40.  
  41. on doPause
  42.   global EnterCounter
  43.   doTimeoutReset()
  44.   set the timeoutLapsed to 0
  45.   set EnterCounter to 1
  46.   pause()
  47. end
  48.  
  49. on doWait a
  50.   global EnterCounter
  51.   set EnterCounter to 1
  52.   delay(a)
  53. end
  54.  
  55. on doContinue
  56.   continue()
  57. end
  58.  
  59. on doMenu
  60.   set the timeoutLength to 60 * 60
  61.   pause()
  62. end
  63.  
  64. on doTimeoutReset
  65.   set the timeoutLength to 10 * 60
  66. end
  67.  
  68. on doTimeoutLong
  69.   set the timeoutLength to 45 * 60
  70. end
  71.  
  72. on doProjects
  73.   global projectNum, seenComic, seenSticker, seenPicture
  74.   set projectNum to seenComic + seenSticker + seenPicture
  75.   if projectNum = 0 then
  76.     go("Project1")
  77.   end if
  78.   if projectNum = 1 then
  79.     go("Project2")
  80.   end if
  81.   if projectNum = 2 then
  82.     go("Project2")
  83.   end if
  84.   if projectNum = 3 then
  85.     go("Project4")
  86.   end if
  87.   go("Project2")
  88. end
  89.  
  90. on doWhichProject
  91.   global project, FA, seenComic, seenSticker, seenPicture
  92.   if project = FA then
  93.     if (seenComic = 0) and (seenSticker = 0) and (seenPicture = 0) then
  94.       go("Comic")
  95.     end if
  96.   end if
  97.   if (seenComic = 1) and (seenSticker = 0) and (seenPicture = 0) then
  98.     go("Sticker")
  99.   end if
  100. end
  101.  
  102. on doKeyDown
  103.   global EnterCounter
  104.   if the key = RETURN then
  105.     if EnterCounter = 1 then
  106.       set EnterCounter to 0
  107.       go(the frame + 1)
  108.     end if
  109.   end if
  110.   if the commandDown and ((the key = "q") or (the key = ".") or (the key = "w")) and (the exitLock = 1) then
  111.     go("Goodbye")
  112.   end if
  113. end
  114.  
  115. on doKeyDownExit
  116.   if the commandDown and ((the key = "q") or (the key = ".") or (the key = "w")) and (the exitLock = 1) then
  117.     go("RealExit")
  118.   end if
  119. end
  120.  
  121. on doSound a
  122.   sound playFile 1, a & ".AIF"
  123. end
  124.  
  125. on doClick
  126.   doSound("CLICK")
  127.   doContinue()
  128. end
  129.  
  130. on doQuit
  131.   play frame "QuitRoutine"
  132. end
  133.  
  134. on playTheme
  135. end
  136.  
  137. on donothing
  138.   nothing()
  139. end
  140.  
  141. on grabtext
  142.   global counter
  143.   put line counter of field "sourcetext" into field "talk"
  144.   set counter to counter + 1
  145. end
  146.  
  147. on grabtextSmall
  148.   global counter
  149.   put line counter of field "sourcetext" into field "talkSmall"
  150.   set counter to counter + 1
  151. end
  152.  
  153. on addtext
  154.   global counter
  155.   set temp to the text of field "talk"
  156.   put temp & RETURN & RETURN & line counter of field "sourcetext" into field "talk"
  157.   set counter to counter + 1
  158. end
  159.  
  160. on addtextSmall
  161.   global counter
  162.   set temp to the text of field "talkSmall"
  163.   put temp & RETURN & line counter of field "sourcetext" into field "talkSmall"
  164.   set counter to counter + 1
  165. end
  166.